Creates an activity
POST/activity/create
Tribally - Game Data Integration Guide
Game Partner: Tribally Integration Guide
5-Stage Process
- JSON payload designed, reviewed and agreed
- NFT Collection contract addresses provided
- Request your API keys from Tribally
- Complete integration and start sending data to test environment
- Tribally implementation and go live in production environment
Stage 1 - JSON Payload Design
You will need to make a POST request to the Tribally ingestion endpoint for each completed game activity, in real-time. The request should contain a JSON payload which contains the required data for that game activity, and all players who played in this game activity. Each payload must contain a unique activity ID, and JSON properties should be literal strings rather than codes or ID numbers.
JSON Payload Template
{
"activityId": "abcd1234", /// A unique ID for this game activity
"gameMode": "arena", /// The game mode that was played
"level": "rust", /// The level/map/stage that was played
"players": [{"playerId":"0x1234"}], /// The players who played
"gameStartedAt": "2024-08-08 02:38:03", /// The time the game was started
... /// Additional data for measuring skill
... /// Additional data for measuring achievement
... /// Additional data you want to show about your game
}
Additional Data
Players
You must identify each human player in the game activity by the player’s wallet address, or some proxy to the wallet address (e.g. Sky Mavis account ID)
You may also wish to add loadout information, including whether each player has used any NFT assets in this game activity. The more data you send about the players and game activity, the more engaging the UX will be on Tribally.
Please note - you should NOT send us any Personal Identifiable Information (PII), such as names, email addresses, etc. Outside of PII, users have no legal claims to the game activity data you are sending us, which is an important measure to ensure legal compliance.
Skill
You should add properties into the JSON payload which recodesent measures of skill in the game activity. Some examples might include:
- How many kills each player made in a battle royale FPS
- The number of stars the player achieved in this level
- The score achieved by each player in this level
Achievement
You should add properties into the JSON payload which recodesent measures of achievement in the game activity. Some examples might include:
- The winner of a PvP battle game
- The finishing position of each player in a racing game
- The before and after MMR of each player in the competition ladder
- The leaderboard position of each player
Supporting UX
You should add properties into the JSON payload which provide additional context and information about the game activity that gamers will find interesting and useful. Some examples might include:
- Adding each player’s loadout information to the “players” object (e.g. weapon, armor, etc)
- Image URLs for any visual assets you would like to be displayed alongside the game activity on Tribally (e.g. avatars, weapons, maps)
Stage 2 - NFT Collections
If you would like to integrate your game’s NFT collections to Tribally, you will need to provide the following information for each collection:
- Collection name
- Contract address
- Blockchain
Stage 3 - Requesting API Keys
- Send Tribally your Slack accounts and request to create a Slack Connect channel
- Say GM to the Tribally engineers👋
- Post your JSON payload design and request for API keys into Slack (one for test environment, one for production)
Stage 4 - Sending the Data
/// Sending data to the Tribally test environment
await axios.post('https://staging-api.tribally.games/activity/create', {
"your": "json_payload",
});
/// Sending data to the Tribally production environment
await axios.post('https://api.tribally.games/activity/create', {
"your": "json_payload",
});
Add the following HTTP header to your requests:
x-api-key: [your_api_key]
Stage 5 - Tribally Implementation and Go-Live
Congratulations! Tribally now has all the data required to fully integrate your game. All you need to do now is configure your production environment to send data to the Tribally production environment, using the Tribally production environment API key, ready to launch at go-live date.
Your technical integration is complete, and the next steps are for your Campaign Manager to plan a go-live date with Tribally.
Request
Responses
- 200
- 400
- 401
- 500
The activity sent as request is sent back as response to confirm what was ingested by Tribally
Bad Request
Unauthorized
Internal Server Error